Integrand size = 28, antiderivative size = 157 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {a \left (2 a^2-3 b^2\right ) \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2} d}+\frac {-3 \left (3 a^4 b-a^2 b^3+b^5\right ) \cos (2 (c+d x))+\frac {1}{2} b \left (-9 a^2+b^2\right ) \left (2 \left (a^2+b^2\right )+3 a b \sin (2 (c+d x))\right )}{6 \left (a^2+b^2\right )^3 d (a \cos (c+d x)+b \sin (c+d x))^3} \]
a*(2*a^2-3*b^2)*arctanh((-b+a*tan(1/2*d*x+1/2*c))/(a^2+b^2)^(1/2))/(a^2+b^ 2)^(7/2)/d+1/6*(-3*(3*a^4*b-a^2*b^3+b^5)*cos(2*d*x+2*c)+1/2*b*(-9*a^2+b^2) *(2*a^2+2*b^2+3*a*b*sin(2*d*x+2*c)))/(a^2+b^2)^3/d/(a*cos(d*x+c)+b*sin(d*x +c))^3
Result contains complex when optimal does not.
Time = 2.06 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.05 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {\frac {6 a \left (2 a^2-3 b^2\right ) \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}+\frac {-3 \left (3 a^4 b-a^2 b^3+b^5\right ) \cos (2 (c+d x))+\frac {1}{2} b \left (-9 a^2+b^2\right ) \left (2 \left (a^2+b^2\right )+3 a b \sin (2 (c+d x))\right )}{(a-i b)^3 (a+i b)^3 (a \cos (c+d x)+b \sin (c+d x))^3}}{6 d} \]
((6*a*(2*a^2 - 3*b^2)*ArcTanh[(-b + a*Tan[(c + d*x)/2])/Sqrt[a^2 + b^2]])/ (a^2 + b^2)^(7/2) + (-3*(3*a^4*b - a^2*b^3 + b^5)*Cos[2*(c + d*x)] + (b*(- 9*a^2 + b^2)*(2*(a^2 + b^2) + 3*a*b*Sin[2*(c + d*x)]))/2)/((a - I*b)^3*(a + I*b)^3*(a*Cos[c + d*x] + b*Sin[c + d*x])^3))/(6*d)
Leaf count is larger than twice the leaf count of optimal. \(391\) vs. \(2(157)=314\).
Time = 1.12 (sec) , antiderivative size = 391, normalized size of antiderivative = 2.49, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 4902, 2191, 27, 2191, 27, 2191, 27, 1083, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^3}{(a \cos (c+d x)+b \sin (c+d x))^4}dx\) |
\(\Big \downarrow \) 4902 |
\(\displaystyle \frac {2 \int \frac {\left (1-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^3}{\left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a\right )^4}d\tan \left (\frac {1}{2} (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 2191 |
\(\displaystyle \frac {2 \left (-\frac {\int -\frac {4 \left (3 \left (\frac {b^2}{a}+a\right ) \tan ^4\left (\frac {1}{2} (c+d x)\right )+6 b \left (\frac {b^2}{a^2}+1\right ) \tan ^3\left (\frac {1}{2} (c+d x)\right )-6 \left (-\frac {2 b^4}{a^3}-\frac {b^2}{a}+a\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )-6 b \left (-\frac {4 b^4}{a^4}-\frac {3 b^2}{a^2}+1\right ) \tan \left (\frac {1}{2} (c+d x)\right )+\frac {3 a^6+3 b^2 a^4-12 b^4 a^2-32 b^6}{a^5}\right )}{\left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a\right )^3}d\tan \left (\frac {1}{2} (c+d x)\right )}{12 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 \left (\frac {\int \frac {-\frac {32 b^6}{a^5}-\frac {12 b^4}{a^3}+\frac {3 b^2}{a}+6 \left (\frac {b^2}{a^2}+1\right ) \tan ^3\left (\frac {1}{2} (c+d x)\right ) b-6 \left (-\frac {4 b^4}{a^4}-\frac {3 b^2}{a^2}+1\right ) \tan \left (\frac {1}{2} (c+d x)\right ) b+3 \left (\frac {b^2}{a}+a\right ) \tan ^4\left (\frac {1}{2} (c+d x)\right )-6 \left (-\frac {2 b^4}{a^3}-\frac {b^2}{a}+a\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+3 a}{\left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a\right )^3}d\tan \left (\frac {1}{2} (c+d x)\right )}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 2191 |
\(\displaystyle \frac {2 \left (\frac {\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {\int -\frac {24 \left (-\frac {\tan ^2\left (\frac {1}{2} (c+d x)\right ) \left (a^2+b^2\right )^2}{a^2}-\frac {4 b \tan \left (\frac {1}{2} (c+d x)\right ) \left (a^2+b^2\right )^2}{a^3}+\frac {a^6-b^2 a^4+7 b^4 a^2+4 b^6}{a^4}\right )}{\left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a\right )^2}d\tan \left (\frac {1}{2} (c+d x)\right )}{8 \left (a^2+b^2\right )}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 \left (\frac {\frac {3 \int \frac {\frac {4 b^6}{a^4}+\frac {7 b^4}{a^2}-b^2-\frac {4 \left (a^2+b^2\right )^2 \tan \left (\frac {1}{2} (c+d x)\right ) b}{a^3}+a^2-\frac {\left (a^2+b^2\right )^2 \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a^2}}{\left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a\right )^2}d\tan \left (\frac {1}{2} (c+d x)\right )}{a^2+b^2}+\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 2191 |
\(\displaystyle \frac {2 \left (\frac {\frac {3 \left (-\frac {\int -\frac {2 a \left (2 a^2-3 b^2\right )}{-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{4 \left (a^2+b^2\right )}-\frac {b \left (b \left (9 a^4+6 a^2 b^2+2 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a^3 \left (\frac {4 b^6}{a^4}+\frac {12 b^4}{a^2}+6 a^2+9 b^2\right )\right )}{2 a^3 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2+b^2}+\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 \left (\frac {\frac {3 \left (\frac {a \left (2 a^2-3 b^2\right ) \int \frac {1}{-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{2 \left (a^2+b^2\right )}-\frac {b \left (b \left (9 a^4+6 a^2 b^2+2 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a^3 \left (\frac {4 b^6}{a^4}+\frac {12 b^4}{a^2}+6 a^2+9 b^2\right )\right )}{2 a^3 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2+b^2}+\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {2 \left (\frac {\frac {3 \left (-\frac {a \left (2 a^2-3 b^2\right ) \int \frac {1}{4 \left (a^2+b^2\right )-\left (2 b-2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}d\left (2 b-2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^2+b^2}-\frac {b \left (b \left (9 a^4+6 a^2 b^2+2 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a^3 \left (\frac {4 b^6}{a^4}+\frac {12 b^4}{a^2}+6 a^2+9 b^2\right )\right )}{2 a^3 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2+b^2}+\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {2 \left (\frac {\frac {b^2 \left (a \left (9 a^4+30 a^2 b^2+16 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+b \left (15 a^4+18 a^2 b^2+8 b^4\right )\right )}{a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {3 \left (-\frac {a \left (2 a^2-3 b^2\right ) \text {arctanh}\left (\frac {2 b-2 a \tan \left (\frac {1}{2} (c+d x)\right )}{2 \sqrt {a^2+b^2}}\right )}{2 \left (a^2+b^2\right )^{3/2}}-\frac {b \left (b \left (9 a^4+6 a^2 b^2+2 b^4\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a^3 \left (\frac {4 b^6}{a^4}+\frac {12 b^4}{a^2}+6 a^2+9 b^2\right )\right )}{2 a^3 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2+b^2}}{3 \left (a^2+b^2\right )}-\frac {4 b^3 \left (b \left (3 a^2+4 b^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )+a \left (a^2+2 b^2\right )\right )}{3 a^5 \left (a^2+b^2\right ) \left (-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+2 b \tan \left (\frac {1}{2} (c+d x)\right )\right )^3}\right )}{d}\) |
(2*((-4*b^3*(a*(a^2 + 2*b^2) + b*(3*a^2 + 4*b^2)*Tan[(c + d*x)/2]))/(3*a^5 *(a^2 + b^2)*(a + 2*b*Tan[(c + d*x)/2] - a*Tan[(c + d*x)/2]^2)^3) + ((b^2* (b*(15*a^4 + 18*a^2*b^2 + 8*b^4) + a*(9*a^4 + 30*a^2*b^2 + 16*b^4)*Tan[(c + d*x)/2]))/(a^5*(a^2 + b^2)*(a + 2*b*Tan[(c + d*x)/2] - a*Tan[(c + d*x)/2 ]^2)^2) + (3*(-1/2*(a*(2*a^2 - 3*b^2)*ArcTanh[(2*b - 2*a*Tan[(c + d*x)/2]) /(2*Sqrt[a^2 + b^2])])/(a^2 + b^2)^(3/2) - (b*(a^3*(6*a^2 + 9*b^2 + (12*b^ 4)/a^2 + (4*b^6)/a^4) + b*(9*a^4 + 6*a^2*b^2 + 2*b^4)*Tan[(c + d*x)/2]))/( 2*a^3*(a^2 + b^2)*(a + 2*b*Tan[(c + d*x)/2] - a*Tan[(c + d*x)/2]^2))))/(a^ 2 + b^2))/(3*(a^2 + b^2))))/d
3.2.42.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*x^2, x], f = Coeff[PolynomialRemainder[P q, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 1]}, Simp[(b*f - 2*a*g + (2*c*f - b*g)*x)*((a + b*x + c*x^2)^ (p + 1)/((p + 1)*(b^2 - 4*a*c))), x] + Simp[1/((p + 1)*(b^2 - 4*a*c)) Int [(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (2*p + 3)* (2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^ 2 - 4*a*c, 0] && LtQ[p, -1]
Int[u_, x_Symbol] :> With[{w = Block[{$ShowSteps = False, $StepCounter = Nu ll}, Int[SubstFor[1/(1 + FreeFactors[Tan[FunctionOfTrig[u, x]/2], x]^2*x^2) , Tan[FunctionOfTrig[u, x]/2]/FreeFactors[Tan[FunctionOfTrig[u, x]/2], x], u, x], x]]}, Module[{v = FunctionOfTrig[u, x], d}, Simp[d = FreeFactors[Tan [v/2], x]; 2*(d/Coefficient[v, x, 1]) Subst[Int[SubstFor[1/(1 + d^2*x^2), Tan[v/2]/d, u, x], x], x, Tan[v/2]/d], x]] /; CalculusFreeQ[w, x]] /; Inve rseFunctionFreeQ[u, x] && !FalseQ[FunctionOfTrig[u, x]]
Leaf count of result is larger than twice the leaf count of optimal. \(493\) vs. \(2(151)=302\).
Time = 1.46 (sec) , antiderivative size = 494, normalized size of antiderivative = 3.15
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-\frac {b^{2} \left (9 a^{4}+6 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 a \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b \left (6 a^{6}-27 a^{4} b^{2}-12 a^{2} b^{4}-4 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2 a^{2} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b^{2} \left (54 a^{6}-21 a^{4} b^{2}-4 a^{2} b^{4}-4 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b \left (6 a^{6}-20 a^{4} b^{2}-3 a^{2} b^{4}-2 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a^{2} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b^{2} \left (27 a^{4}+4 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b \left (18 a^{4}+5 a^{2} b^{2}+2 b^{4}\right )}{6 \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \sqrt {a^{2}+b^{2}}}}{d}\) | \(494\) |
default | \(\frac {-\frac {2 \left (-\frac {b^{2} \left (9 a^{4}+6 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 a \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b \left (6 a^{6}-27 a^{4} b^{2}-12 a^{2} b^{4}-4 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2 a^{2} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b^{2} \left (54 a^{6}-21 a^{4} b^{2}-4 a^{2} b^{4}-4 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b \left (6 a^{6}-20 a^{4} b^{2}-3 a^{2} b^{4}-2 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a^{2} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b^{2} \left (27 a^{4}+4 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b \left (18 a^{4}+5 a^{2} b^{2}+2 b^{4}\right )}{6 \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \sqrt {a^{2}+b^{2}}}}{d}\) | \(494\) |
risch | \(\frac {i b \,{\mathrm e}^{i \left (d x +c \right )} \left (-27 i a^{3} b \,{\mathrm e}^{4 i \left (d x +c \right )}+3 i a \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+18 a^{4} {\mathrm e}^{4 i \left (d x +c \right )}-6 a^{2} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+6 b^{4} {\mathrm e}^{4 i \left (d x +c \right )}+36 a^{4} {\mathrm e}^{2 i \left (d x +c \right )}+32 a^{2} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-4 b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+27 i a^{3} b -3 i a \,b^{3}+18 a^{4}-6 a^{2} b^{2}+6 b^{4}\right )}{3 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{3} \left (-i a +b \right )^{3} d \left (i a +b \right )^{3}}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}} d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right ) b^{2}}{2 \left (a^{2}+b^{2}\right )^{\frac {7}{2}} d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}} d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right ) b^{2}}{2 \left (a^{2}+b^{2}\right )^{\frac {7}{2}} d}\) | \(634\) |
1/d*(-2*(-1/2*b^2*(9*a^4+6*a^2*b^2+2*b^4)/a/(a^6+3*a^4*b^2+3*a^2*b^4+b^6)* tan(1/2*d*x+1/2*c)^5-1/2*b*(6*a^6-27*a^4*b^2-12*a^2*b^4-4*b^6)/a^2/(a^6+3* a^4*b^2+3*a^2*b^4+b^6)*tan(1/2*d*x+1/2*c)^4+1/3/a^3*b^2*(54*a^6-21*a^4*b^2 -4*a^2*b^4-4*b^6)/(a^6+3*a^4*b^2+3*a^2*b^4+b^6)*tan(1/2*d*x+1/2*c)^3+1/a^2 *b*(6*a^6-20*a^4*b^2-3*a^2*b^4-2*b^6)/(a^6+3*a^4*b^2+3*a^2*b^4+b^6)*tan(1/ 2*d*x+1/2*c)^2-1/2/a*b^2*(27*a^4+4*a^2*b^2+2*b^4)/(a^6+3*a^4*b^2+3*a^2*b^4 +b^6)*tan(1/2*d*x+1/2*c)-1/6*b*(18*a^4+5*a^2*b^2+2*b^4)/(a^6+3*a^4*b^2+3*a ^2*b^4+b^6))/(tan(1/2*d*x+1/2*c)^2*a-2*b*tan(1/2*d*x+1/2*c)-a)^3+a*(2*a^2- 3*b^2)/(a^6+3*a^4*b^2+3*a^2*b^4+b^6)/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tan( 1/2*d*x+1/2*c)-2*b)/(a^2+b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 524 vs. \(2 (152) = 304\).
Time = 0.28 (sec) , antiderivative size = 524, normalized size of antiderivative = 3.34 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {22 \, a^{4} b^{3} + 14 \, a^{2} b^{5} - 8 \, b^{7} + 12 \, {\left (3 \, a^{6} b + 2 \, a^{4} b^{3} + b^{7}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (9 \, a^{5} b^{2} + 8 \, a^{3} b^{4} - a b^{6}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, {\left ({\left (2 \, a^{6} - 9 \, a^{4} b^{2} + 9 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a^{4} b^{2} - 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right ) + {\left (2 \, a^{3} b^{3} - 3 \, a b^{5} + {\left (6 \, a^{5} b - 11 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{12 \, {\left ({\left (a^{11} + a^{9} b^{2} - 6 \, a^{7} b^{4} - 14 \, a^{5} b^{6} - 11 \, a^{3} b^{8} - 3 \, a b^{10}\right )} d \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{9} b^{2} + 4 \, a^{7} b^{4} + 6 \, a^{5} b^{6} + 4 \, a^{3} b^{8} + a b^{10}\right )} d \cos \left (d x + c\right ) + {\left ({\left (3 \, a^{10} b + 11 \, a^{8} b^{3} + 14 \, a^{6} b^{5} + 6 \, a^{4} b^{7} - a^{2} b^{9} - b^{11}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{8} b^{3} + 4 \, a^{6} b^{5} + 6 \, a^{4} b^{7} + 4 \, a^{2} b^{9} + b^{11}\right )} d\right )} \sin \left (d x + c\right )\right )}} \]
-1/12*(22*a^4*b^3 + 14*a^2*b^5 - 8*b^7 + 12*(3*a^6*b + 2*a^4*b^3 + b^7)*co s(d*x + c)^2 + 6*(9*a^5*b^2 + 8*a^3*b^4 - a*b^6)*cos(d*x + c)*sin(d*x + c) + 3*((2*a^6 - 9*a^4*b^2 + 9*a^2*b^4)*cos(d*x + c)^3 + 3*(2*a^4*b^2 - 3*a^ 2*b^4)*cos(d*x + c) + (2*a^3*b^3 - 3*a*b^5 + (6*a^5*b - 11*a^3*b^3 + 3*a*b ^5)*cos(d*x + c)^2)*sin(d*x + c))*sqrt(a^2 + b^2)*log((2*a*b*cos(d*x + c)* sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 - 2*a^2 - b^2 - 2*sqrt(a^2 + b^2 )*(b*cos(d*x + c) - a*sin(d*x + c)))/(2*a*b*cos(d*x + c)*sin(d*x + c) + (a ^2 - b^2)*cos(d*x + c)^2 + b^2)))/((a^11 + a^9*b^2 - 6*a^7*b^4 - 14*a^5*b^ 6 - 11*a^3*b^8 - 3*a*b^10)*d*cos(d*x + c)^3 + 3*(a^9*b^2 + 4*a^7*b^4 + 6*a ^5*b^6 + 4*a^3*b^8 + a*b^10)*d*cos(d*x + c) + ((3*a^10*b + 11*a^8*b^3 + 14 *a^6*b^5 + 6*a^4*b^7 - a^2*b^9 - b^11)*d*cos(d*x + c)^2 + (a^8*b^3 + 4*a^6 *b^5 + 6*a^4*b^7 + 4*a^2*b^9 + b^11)*d)*sin(d*x + c))
Timed out. \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 724 vs. \(2 (152) = 304\).
Time = 0.34 (sec) , antiderivative size = 724, normalized size of antiderivative = 4.61 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {\frac {3 \, {\left (2 \, a^{2} - 3 \, b^{2}\right )} a \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} + \frac {2 \, {\left (18 \, a^{7} b + 5 \, a^{5} b^{3} + 2 \, a^{3} b^{5} + \frac {3 \, {\left (27 \, a^{6} b^{2} + 4 \, a^{4} b^{4} + 2 \, a^{2} b^{6}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {6 \, {\left (6 \, a^{7} b - 20 \, a^{5} b^{3} - 3 \, a^{3} b^{5} - 2 \, a b^{7}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {2 \, {\left (54 \, a^{6} b^{2} - 21 \, a^{4} b^{4} - 4 \, a^{2} b^{6} - 4 \, b^{8}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, {\left (6 \, a^{7} b - 27 \, a^{5} b^{3} - 12 \, a^{3} b^{5} - 4 \, a b^{7}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {3 \, {\left (9 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 2 \, a^{2} b^{6}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{12} + 3 \, a^{10} b^{2} + 3 \, a^{8} b^{4} + a^{6} b^{6} + \frac {6 \, {\left (a^{11} b + 3 \, a^{9} b^{3} + 3 \, a^{7} b^{5} + a^{5} b^{7}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {3 \, {\left (a^{12} - a^{10} b^{2} - 9 \, a^{8} b^{4} - 11 \, a^{6} b^{6} - 4 \, a^{4} b^{8}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {4 \, {\left (3 \, a^{11} b + 7 \, a^{9} b^{3} + 3 \, a^{7} b^{5} - 3 \, a^{5} b^{7} - 2 \, a^{3} b^{9}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, {\left (a^{12} - a^{10} b^{2} - 9 \, a^{8} b^{4} - 11 \, a^{6} b^{6} - 4 \, a^{4} b^{8}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {6 \, {\left (a^{11} b + 3 \, a^{9} b^{3} + 3 \, a^{7} b^{5} + a^{5} b^{7}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {{\left (a^{12} + 3 \, a^{10} b^{2} + 3 \, a^{8} b^{4} + a^{6} b^{6}\right )} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}}}{6 \, d} \]
-1/6*(3*(2*a^2 - 3*b^2)*a*log((b - a*sin(d*x + c)/(cos(d*x + c) + 1) + sqr t(a^2 + b^2))/(b - a*sin(d*x + c)/(cos(d*x + c) + 1) - sqrt(a^2 + b^2)))/( (a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)*sqrt(a^2 + b^2)) + 2*(18*a^7*b + 5*a^5 *b^3 + 2*a^3*b^5 + 3*(27*a^6*b^2 + 4*a^4*b^4 + 2*a^2*b^6)*sin(d*x + c)/(co s(d*x + c) + 1) - 6*(6*a^7*b - 20*a^5*b^3 - 3*a^3*b^5 - 2*a*b^7)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 2*(54*a^6*b^2 - 21*a^4*b^4 - 4*a^2*b^6 - 4*b^ 8)*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*(6*a^7*b - 27*a^5*b^3 - 12*a^3* b^5 - 4*a*b^7)*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 3*(9*a^6*b^2 + 6*a^4* b^4 + 2*a^2*b^6)*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a^12 + 3*a^10*b^2 + 3*a^8*b^4 + a^6*b^6 + 6*(a^11*b + 3*a^9*b^3 + 3*a^7*b^5 + a^5*b^7)*sin(d* x + c)/(cos(d*x + c) + 1) - 3*(a^12 - a^10*b^2 - 9*a^8*b^4 - 11*a^6*b^6 - 4*a^4*b^8)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 4*(3*a^11*b + 7*a^9*b^3 + 3*a^7*b^5 - 3*a^5*b^7 - 2*a^3*b^9)*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*(a^12 - a^10*b^2 - 9*a^8*b^4 - 11*a^6*b^6 - 4*a^4*b^8)*sin(d*x + c)^4/(c os(d*x + c) + 1)^4 + 6*(a^11*b + 3*a^9*b^3 + 3*a^7*b^5 + a^5*b^7)*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - (a^12 + 3*a^10*b^2 + 3*a^8*b^4 + a^6*b^6)*si n(d*x + c)^6/(cos(d*x + c) + 1)^6))/d
Leaf count of result is larger than twice the leaf count of optimal. 524 vs. \(2 (152) = 304\).
Time = 0.41 (sec) , antiderivative size = 524, normalized size of antiderivative = 3.34 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {\frac {3 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} - \frac {2 \, {\left (27 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 81 \, a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 36 \, a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 12 \, a b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 108 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 42 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, b^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 120 \, a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 18 \, a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 81 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, a^{7} b + 5 \, a^{5} b^{3} + 2 \, a^{3} b^{5}\right )}}{{\left (a^{9} + 3 \, a^{7} b^{2} + 3 \, a^{5} b^{4} + a^{3} b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a\right )}^{3}}}{6 \, d} \]
-1/6*(3*(2*a^3 - 3*a*b^2)*log(abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b - 2*sqrt( a^2 + b^2))/abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b + 2*sqrt(a^2 + b^2)))/((a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)*sqrt(a^2 + b^2)) - 2*(27*a^6*b^2*tan(1/2*d *x + 1/2*c)^5 + 18*a^4*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*a^2*b^6*tan(1/2*d*x + 1/2*c)^5 + 18*a^7*b*tan(1/2*d*x + 1/2*c)^4 - 81*a^5*b^3*tan(1/2*d*x + 1/ 2*c)^4 - 36*a^3*b^5*tan(1/2*d*x + 1/2*c)^4 - 12*a*b^7*tan(1/2*d*x + 1/2*c) ^4 - 108*a^6*b^2*tan(1/2*d*x + 1/2*c)^3 + 42*a^4*b^4*tan(1/2*d*x + 1/2*c)^ 3 + 8*a^2*b^6*tan(1/2*d*x + 1/2*c)^3 + 8*b^8*tan(1/2*d*x + 1/2*c)^3 - 36*a ^7*b*tan(1/2*d*x + 1/2*c)^2 + 120*a^5*b^3*tan(1/2*d*x + 1/2*c)^2 + 18*a^3* b^5*tan(1/2*d*x + 1/2*c)^2 + 12*a*b^7*tan(1/2*d*x + 1/2*c)^2 + 81*a^6*b^2* tan(1/2*d*x + 1/2*c) + 12*a^4*b^4*tan(1/2*d*x + 1/2*c) + 6*a^2*b^6*tan(1/2 *d*x + 1/2*c) + 18*a^7*b + 5*a^5*b^3 + 2*a^3*b^5)/((a^9 + 3*a^7*b^2 + 3*a^ 5*b^4 + a^3*b^6)*(a*tan(1/2*d*x + 1/2*c)^2 - 2*b*tan(1/2*d*x + 1/2*c) - a) ^3))/d
Time = 26.65 (sec) , antiderivative size = 764, normalized size of antiderivative = 4.87 \[ \int \frac {\cos ^3(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {\ln \left ({\left (a^2+b^2\right )}^{7/2}+a^6\,b+b^7+3\,a^2\,b^5+3\,a^4\,b^3-a^7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-a\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-3\,a^3\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-3\,a^5\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {3\,a\,b^2}{2}-a^3\right )}{d\,{\left (a^2+b^2\right )}^{7/2}}-\frac {\frac {18\,a^4\,b+5\,a^2\,b^3+2\,b^5}{3\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-6\,a^6\,b+20\,a^4\,b^3+3\,a^2\,b^5+2\,b^7\right )}{a^2\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-6\,a^6\,b+27\,a^4\,b^3+12\,a^2\,b^5+4\,b^7\right )}{a^2\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (27\,a^4\,b+4\,a^2\,b^3+2\,b^5\right )}{a\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (9\,a^4\,b+6\,a^2\,b^3+2\,b^5\right )}{a\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}-\frac {2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2-2\,b^2\right )\,\left (18\,a^4\,b+5\,a^2\,b^3+2\,b^5\right )}{3\,a^3\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a\,b^2-3\,a^3\right )-a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (12\,a\,b^2-3\,a^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (12\,a^2\,b-8\,b^3\right )+a^3+6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}+\frac {a\,\ln \left ({\left (a^2+b^2\right )}^{7/2}-a^6\,b-b^7-3\,a^2\,b^5-3\,a^4\,b^3+a^7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+3\,a^3\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+3\,a^5\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^2-3\,b^2\right )}{2\,d\,{\left (a^2+b^2\right )}^{7/2}} \]
(log((a^2 + b^2)^(7/2) + a^6*b + b^7 + 3*a^2*b^5 + 3*a^4*b^3 - a^7*tan(c/2 + (d*x)/2) - a*b^6*tan(c/2 + (d*x)/2) - 3*a^3*b^4*tan(c/2 + (d*x)/2) - 3* a^5*b^2*tan(c/2 + (d*x)/2))*((3*a*b^2)/2 - a^3))/(d*(a^2 + b^2)^(7/2)) - ( (18*a^4*b + 2*b^5 + 5*a^2*b^3)/(3*(a^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)) + ( 2*tan(c/2 + (d*x)/2)^2*(2*b^7 - 6*a^6*b + 3*a^2*b^5 + 20*a^4*b^3))/(a^2*(a ^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)) - (tan(c/2 + (d*x)/2)^4*(4*b^7 - 6*a^6* b + 12*a^2*b^5 + 27*a^4*b^3))/(a^2*(a^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)) + (b*tan(c/2 + (d*x)/2)*(27*a^4*b + 2*b^5 + 4*a^2*b^3))/(a*(a^6 + b^6 + 3*a^ 2*b^4 + 3*a^4*b^2)) + (b*tan(c/2 + (d*x)/2)^5*(9*a^4*b + 2*b^5 + 6*a^2*b^3 ))/(a*(a^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)) - (2*b*tan(c/2 + (d*x)/2)^3*(3* a^2 - 2*b^2)*(18*a^4*b + 2*b^5 + 5*a^2*b^3))/(3*a^3*(a^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)))/(d*(tan(c/2 + (d*x)/2)^2*(12*a*b^2 - 3*a^3) - a^3*tan(c/2 + (d*x)/2)^6 - tan(c/2 + (d*x)/2)^4*(12*a*b^2 - 3*a^3) - tan(c/2 + (d*x)/2 )^3*(12*a^2*b - 8*b^3) + a^3 + 6*a^2*b*tan(c/2 + (d*x)/2) + 6*a^2*b*tan(c/ 2 + (d*x)/2)^5)) + (a*log((a^2 + b^2)^(7/2) - a^6*b - b^7 - 3*a^2*b^5 - 3* a^4*b^3 + a^7*tan(c/2 + (d*x)/2) + a*b^6*tan(c/2 + (d*x)/2) + 3*a^3*b^4*ta n(c/2 + (d*x)/2) + 3*a^5*b^2*tan(c/2 + (d*x)/2))*(2*a^2 - 3*b^2))/(2*d*(a^ 2 + b^2)^(7/2))